package com.example.forum.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.forum.entity.TRolepermission;
import com.example.forum.mapper.TRolepermissionMapper;
import com.example.forum.service.ITRolepermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author why
 * @since 2019-10-30
 */
@Service
public class TRolepermissionServiceImpl extends ServiceImpl<TRolepermissionMapper, TRolepermission> implements ITRolepermissionService {
    @Resource
    private TRolepermissionMapper tmapper;
    public String[] getPermissionsByRoleId(String roleid){

        List<String> list= tmapper.getPermissionsByRoleId(roleid);
        return 	(String[]) list.toArray(new String[0]);
    }
}
